// Ofri Keidar 302933981 group 05

/**
 * Used to parse parameters out of string. Each class derived from Apartment, should have its own parameter parser class that implements
 * this interface
 */
package model.apartment;

import java.util.Map;

public interface ParameterParser {
	
	// indices for parameters in tokens array
	public final int FLOOR_INDX = 0;
	public final int ROOM_NUMBER_INDX = 1;
	public final int SIZE_INDX = 2;
	public final int EXTRA_UNIT_INDX = 3;
	public final int RES_NAME_INDX = 4;
	public final int SEP_ENTRANCE_INDX = 5;
	
	// keys for parameters in map
	public static final String FLOOR = "floor";
	public static final String ROOM_NUMBER = "roomNumber";
	public static final String SIZE = "size";
	public static final String EXTRA_UNIT = "extraUnit";
	public static final String RESIDENT_NAME = "residentName";
	public static final String SEPARATE_ENTRANCE = "separateEntrace";
	
	/**
	 * Gets array of tokens and checks, according to apartment's type, if parameters were given in correct format.
	 * If format is incorrect, an empty map is returned 
	 * @param parameters- tokens array of parameters
	 * @return map holding parameters
	 */
	public Map<String, String> parseParameters(String[] parameters); 
}

